<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="./resources/Template.xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <link rel="stylesheet" type="text/css" href="resources/css/style2.css" />
        <h:outputStylesheet library="css" name="estilo.css" />
        <h:outputStylesheet library="css" name="tabela.css" />
        <div class="header">
            Ranking dos Funcionários que mais emprestaram livros
        </div>
        <h:form>
            <h:dataTable value="#{rankingFuncionario.rankingFuncionarios}" var="r" styleClass="tabela" headerClass="cabecalho" rowClasses="linA, linB"
                         columnClasses="c_titulo, f_codigo">
                <h:column>
                    <f:facet name="header">Funcionário</f:facet>
                        #{r.titulo}
                </h:column>
                <h:column>
                    <f:facet name="header">Livros</f:facet>
                        #{r.qtde}
                </h:column>
            </h:dataTable>
            <h:commandButton value="Imprimir" styleClass="btn">
                <p:fileDownload value="#{rankingFuncionario.arquivoRetorno}" />
            </h:commandButton>
        </h:form>
    </ui:define>

</ui:composition>
